import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println(Math.pow(2.0,15));
    }

    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int[][] array = new int[n][2];
        for (int i = 0; i < n; i++) {
            array[i][0] = scanner.nextInt();
            array[i][1] = scanner.nextInt();
        }

        Solution2 solution = new Solution2();
        System.out.println(solution.largestTriangleArea(array));
    }

    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = scanner.nextInt();
        }

        Solution1 solution = new Solution1();
        System.out.println(solution.largestPerimeter(array));
    }
}

class Solution2 {
    public double largestTriangleArea(int[][] points) {
        int n = points.length;
        int res = 0;
        for (int i = 0; i < n - 2; i++) {
            for (int j = i + 1; j < n - 1; j++) {
                for (int k = j + 1; k < n; k++) {
                    int[] p1 = points[i];
                    int[] p2 = points[j];
                    int[] p3 = points[k];
                    int x1 = p1[0] - p2[0];
                    int y1 = p1[1] - p2[1];
                    int x2 = p1[0] - p3[0];
                    int y2 = p1[1] - p3[1];
                    res = Math.max(res,Math.abs(x1 * y2 - x2 * y1));
                }
            }
        }
        return res / 2.0;
    }
}

class Solution1 {
    public int largestPerimeter(int[] nums) {
        Arrays.sort(nums);
        int n = nums.length;

        for (int i = n - 1; i >= 2 ; i--) {
            if(nums[i - 1] + nums[i - 2] > nums[i]){
                return nums[i - 1] + nums[i - 2] + nums[i];
            }
        }
        return 0;
    }
}